package com.agynamix.scala.mi

import _root_.java.util.Enumeration
import _root_.java.io.File

/**
 * Created by IntelliJ IDEA.
 * User: tuhlmann
 * Date: 11.04.2010
 * Time: 18:13:12
 * To change this template use File | Settings | File Templates.
 */

object Conversions {

  implicit def file2richFile(file:File) = new WrapperClasses(file)


  implicit def enum2Iterator[A](e : Enumeration[A]) = new Iterator[A] {
    def next = e.nextElement
    def hasNext = e.hasMoreElements
  }

  implicit def javaIterator2scalaIterator[A](it : java.util.Iterator[A]) = new Iterator[A] {
    def next = it.next
    def hasNext = it.hasNext
  }

}